package com.st.controller;

import com.st.entity.Attractions;
import com.st.entity.Result;
import com.st.service.IAttractionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/attractions")
public class AttractionsController {

    @Autowired
    private IAttractionsService iAttractionsService;
    //查询所有景点
    @RequestMapping("/findAll")
    public List<Attractions> findAll(){
        return iAttractionsService.findAll();
    }

    //保存热门景点
    @RequestMapping("/saveHot")
    public Result saveHot(){
        return iAttractionsService.saveHot();
    }

}
